<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
<%@include file="../commons/taglibs.jsp" %>
<%@include file="../commons/jquery-validation.jsp" %>
<%@include file="../commons/ztree-3.5.jsp" %>

<script type="text/javascript" src="${base_file}/js/power/toCopy.js"></script>
<div class="modal-body">
	<div class="container-fluid">
		<form id="frm" method="POST" class="form-horizontal" role="form">
			<div class="row-fluid">
			  <div class="col-sm-6">	
				<div class="form-group">
					<label for="powerName" class="col-sm-4 control-label">权限名称</label>
					<div class="col-sm-8">
						<input class="form-control" id="powerName"  name="power.powerName" type="text" value="${power.powerName}"/>
					</div>
				</div>
			  </div>
			  <div class="col-sm-6">	
				<div class="form-group">
					<label for="fatherId" class="col-sm-4 control-label">上级菜单</label>
					<div class="col-sm-8">
						<input id="fatherIdVal" type="hidden" name="power.fatherId" value="${power.fatherId}"/>
						<input id="fatherId" onclick="showMenu();return false;" value="${power.fatherName}" class="form-control" type="text" readonly style="width:80%;display:inline-block;"/>
						<a id="fatherIdzTreeBut" href="#" onclick="showMenu();return false;">选择</a>
						<div style="display:none;position:absolute;z-index:1;">
							<ul id="fatherIdzTree" class="ztree" style="margin-top:0;width:160px;"></ul>
						</div>
					</div>
				</div>
			  </div>
			</div>
			<div class="row-fluid">
			  <div class="col-sm-6">		
				<div class="form-group">
					<label for="powerCode" class="col-sm-4 control-label">权限代码</label>
					<div class="col-sm-8">
						<input class="form-control" id="powerCode" name="power.powerCode" value="${power.powerCode}" type="text" />
					</div>
				</div>
			  </div>
			  <div class="col-sm-6">
				<div class="form-group">
					<label for="url" class="col-sm-4 control-label">权限URL</label>
					<div class="col-sm-8">
						<input class="form-control" id="url" name="power.url" value="${power.url}" type="text" >
					</div>
				</div>
			  </div>
			</div>
			<div class="row-fluid">
			  <div class="col-sm-6">
				<div class="form-group">
					<label for="type" class="col-sm-4 control-label">权限类型</label>
					<div class="col-sm-8">
						<label class="radio-inline">
						  <input type="radio" name="power.type" <c:if test="${power.type eq 'M'}">checked="checked"</c:if> id="type1" value="M"> 菜单
						</label>
						<label class="radio-inline">
						  <input type="radio" name="power.type" <c:if test="${power.type eq 'O'}">checked="checked"</c:if> id="type2" value="O"> 操作
						</label>
					</div>
				</div>
			  </div>
			  <div class="col-sm-6">
				<div class="form-group">
					<label for="iconCls" class="col-sm-4 control-label">权限图标</label>
					<div class="col-sm-8">
						<input class="form-control" id="iconCls" name="power.iconCls" type="text" value="${power.iconCls}" >
					</div>
				</div>
			  </div>
			</div>
			<div class="row-fluid">
			  <div class="col-sm-6">
				<div class="form-group">
					<label for="position" class="col-sm-4 control-label">显示位置</label>
					<div class="col-sm-8">
						<label class="checkbox-inline">
						  <input type="checkbox" name="power.position" <c:if test="${fn:contains(power.position,'top')}">checked="checked"</c:if> value="top"> 头部
						</label>
						<label class="checkbox-inline">
						  <input type="checkbox" name="power.position" <c:if test="${fn:contains(power.position,'middle')}">checked="checked"</c:if> value="middle"> 行间
						</label>
					</div>
				</div>
			  </div>
			  <div class="col-sm-6">
				<div class="form-group">
					<label for="used" class="col-sm-4 control-label">是否启用</label>
					<div class="col-sm-8">
						<label class="radio-inline">
						  <input type="radio" name="power.used" <c:if test="${power.used eq 1}">checked="checked"</c:if> id="used1" value="1"> 是
						</label>
						<label class="radio-inline">
						  <input type="radio" name="power.used" <c:if test="${power.used eq 0}">checked="checked"</c:if> id="used2" value="0"> 否
						</label>
					</div>
				</div>
			  </div>
			</div>
			<div class="row-fluid">
			  <div class="col-sm-6">
				<div class="form-group">
					<label for="seq" class="col-sm-4 control-label">排序序号</label>
					<div class="col-sm-8">
						<input class="form-control" id="seq" name="power.seq" value="${power.seq}" type="text" >
					</div>
				</div>
			  </div>
			</div>
		</form>
	</div>
</div>
<div class="modal-footer">
	<a class="btn btn-success" id="copyPower" data-loading-text="提交中...">保存</a>
	<a class="btn btn-default" onclick="gDialog.fClose();">关闭</a>
</div>